Skip to content

Fix Windows installer machine scope PATH update#29169

Open
l0rd wants to merge 1 commit into
podman-container-tools:mainfrom
l0rd:fix-update-path-in-machine-scope-win-installer
Open

Fix Windows installer machine scope PATH update#29169
l0rd wants to merge 1 commit into
podman-container-tools:mainfrom
l0rd:fix-update-path-in-machine-scope-win-installer

Conversation

@l0rd

@l0rd l0rd commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Update Podman Windows installer to update the PATH for all users if executed in machine scope mode.

Added a new test that checks if Podman installation folder is in PATH.

Fixes #29160

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

None

Update Podman Windows installer to update the PATH for all users if
executed in machine scope mode.

Added a new test that checks if Podman installation folder is in PATH.

Fixes podman-container-tools#29160

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
@TomSweeneyRedHat

Copy link
Copy Markdown
Contributor

LGTM
but I'd like someone with more machine experience to looksee

@Honny1 Honny1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but deffer to windows experts.

PTAL @lstocchi

@lstocchi lstocchi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works fine but i have a doubt on IS_UPGRADE. Is it really needed?

Condition="MSIINSTALLPERUSER=1 AND NOT IS_UPGRADE" >
<CreateFolder />
<Environment Id="UpdatePath" Name="PATH" Action="set" Permanent="no" Part="last" Value="[INSTALLDIR]" />
<Environment Id="UpdatePath" Name="PATH" Action="set" Permanent="no" Part="last" Value="[INSTALLDIR]" System="false"/>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is true/false correct for System? In the doc wix3 doc i see it was a YesNoType https://docs.firegiant.com/wix3/xsd/wix/environment/ , then in wix4 it is marked as bool but in the description it keeps saying "no" is the default value so it makes me think it's still yes/no

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing it, it works fine so i guess the boolean is also accepted

<Directory Id="EnvEntries">
<Component Id="EnvEntriesComponent" Guid="b662ec43-0e0e-4018-8bf3-061904bb8f5b" Bitness="always64">
<Component Id="EnvEntriesComponent" Guid="b662ec43-0e0e-4018-8bf3-061904bb8f5b" Bitness="always64"
Condition="MSIINSTALLPERUSER=1 AND NOT IS_UPGRADE" >

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is IS_UPGRADE actually needed? I did not find any mention of it in the doc. If it works as the name suggests, wouldn't it create a broken installation? I mean you want to install podman (an upgrade), it uninstall the old one, it clears PATH, then the new installation is performed but as there is NOT IS_UPGRADE the PATH update is skipped. I did a test with WIX_UPGRADE_DETECTED and it does not actually update the path. So i have the feeling it works bc IS_UPGRADE is not actually filled properly so it is always false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Machine-scope installation (ALLUSERS=1) writes PATH to installing user's HKCU instead of system PATH

4 participants